package com.example.day22.ex08;

public class PrintString {
    public void printUpper(String s){
        String result=s.toUpperCase();
        System.out.println(result);
    }
}
class PrinterDemo{
    public static void main(String[] args) {
        usePrinter(s-> System.out.println(s.toUpperCase()));
        PrintString ps=new PrintString();
        usePrinter(ps::printUpper);
    }
    private static void usePrinter(Printer p){
        p.printUpperCase("hello");
    }
}
